package com.zut.blocks.service.course;

import com.zut.blocks.base.common.request.CourseRequest;
import com.zut.blocks.base.common.request.StudentRequest;
import com.zut.blocks.base.domain.Course;
import com.zut.blocks.service.course.vo.Student;
import com.zut.blocks.service.course.vo.StudentCourseGroup;
import org.springframework.data.domain.Page;

import java.util.List;

/**
 * @author tianwei
 */
public interface CourseService {

    List<Course> findAll();



    void group(String courseName);


    /**
     * delete one course
     * @param courseId
     * @return
     */
    Integer delete(Integer courseId);

    void change(String courseName);

    void save(String teacherName, String courseName);

    /**
     * query course, pageable
     * @param courseRequest
     * @return
     */
    Page<Course> find(CourseRequest courseRequest);

    /**
     * find course student by course id
     * @param request
     * @return
     */
    List<Student> findCourseStudent(StudentRequest request);

    /**
     * find one course
     * @param courseId
     * @return
     */
    Course findCourse(Integer courseId);

    /**
     * add course
     * @param course
     * @return
     */
    Course add(Course course);

    List<StudentCourseGroup> findAllByCourseId(Integer courseId);

}
